package com.geek.javase.ch06.test4;

/*
 *@author wangpeng
 *2025/10/14 23:33
 *@description TODO
 */

/**
 * 完成基本数据类型和包装类之间的转换
 已知：double a = 12.5;
 a转换为String类型后+10的结果为:12.510

 已知：String str = "2.8";
 str转换为double型后+10的结果为:12.8
 */
public class Demo1 {
    public static void main(String[] args) {
        double a = 12.5;
        String aStr = String.valueOf(a);
        System.out.println(aStr + 10);

        String str = "2.8";
        double strDouble = Double.parseDouble(str);
        System.out.println(strDouble+10);
    }

}
